package cn.maiyar.generator.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * 代码生成相关配置
 *
 * @author c.c
 */
@Data
public class CustomCode implements Serializable {
    // 作者
    private String author = "c.c";
    // 项目名称
    private String systemName = "maiyar";
    // 服务名
    private String serviceName = "mr-generator";
    // 父包名
    private String parentName = "cn.maiyar";
    // 父包模块名
    private String moduleName = "generator";

    // 生成代码的路径 默认当前项目自动生成'Code'目录下
    private String packageDir = "";
    // 需要过滤掉的表前缀
    private String[] tablePrefix = {"mr_"};
    // 需要过滤掉的表后缀
    private String[] tableSuffix = {"_x"};
    // 需要过滤掉的字段前缀
    private String[] fieldPrefix = {"mr_"};
    // 需要过滤掉的字段后缀
    private String[] fieldSuffix = {"_x"};
    // 需要生成的表名(两者只能取其一)
    private String[] includeTables = {"mr_datasource"};
    // 需要排除的表名(两者只能取其一)
    private String[] excludeTables = {};

    // 是否包含包装器
    private Boolean hasWrapper = Boolean.FALSE;
    // 是否包含父类公共字段
    private Boolean hasSuperEntity = Boolean.FALSE;
    // 父类公共字段
    private String[] superEntityColumns = {"create_time", "create_by", "update_time", "update_by", "status", "is_deleted"};
    // 租户字段
    private String tenantColumn = "tenant_id";
    // 是否启用swagger
    private Boolean isSwagger = Boolean.TRUE;
    // 文件生成覆蓋
    private Boolean fileOverride = Boolean.TRUE;

    // 数据源
    private CustomDataSource dataSource;
}
